<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page isELIgnored="false" %>
<%@ include file="/WEB-INF/views/common/includes.jsp" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8">
		<title><fmt:message key="event.website.title"/></title>
		<link href="<c:url value='/static/css/estilo_efqm.css'/>" rel="stylesheet" type="text/css" />
		<link type='text/css' href='/static/css/basic.css' rel='stylesheet' media='screen' />
		<!-- IE 6 "fixes" -->
		<!--[if lt IE 7]>
			<link type='text/css' href='/static/css/basic_ie.css' rel='stylesheet' media='screen' />
		<![endif]-->
		
		<script type="text/javascript" src="<c:url value='/static/js/google_analytics_inc.js'/>"></script>
		<script type="text/javascript" src="<c:url value='/static/js/jquery-1.4.min.js'/>"></script>
		<script type="text/javascript" src="<c:url value='/static/js/jquery.simplemodal.js'/>"></script>
		<script type="text/javascript" src="<c:url value='/static/js/jquery.tablesorter.min.js'/>"></script>
		<script type="text/javascript" src="<c:url value='/static/js/basic.js'/>"></script>
		
		<script type="text/javascript">

			$(document).ready(function() { 
		    	// call the tablesorter plugin 
		    	$("table").tablesorter({ 
		        	// sort on the first column and third column, order asc 
		        	sortList: [[0,0],[2,0]],
		        	headers: { 1: { sorter: false}, 3: {sorter: false}, 4: {sorter: false} }
		    	}); 
			});
  			
		</script>
		
	</head>
	<body id="efqm">
	
		<!-- modal content -->
		<div id="basic-modal-content">
			<div id="osx-modal-title"><fmt:message key="action.filter.select.msg"/></div>		
			<c:forEach items="${cloud.tags}" var="tag">
				<a href="<c:url value='/company/facet/activity-sector/${tag.link}'/>"><fmt:message key="${tag.name}"/></a>
			</c:forEach>	
		</div>
		
		<!-- modal content -->
		<div id="basic2-modal-content">
			<span><fmt:message key="action.filter.innovation.type.select.msg"/></span>
			<ul>
			<c:forEach items="${bestPracticeTypes}" var="bestPracticeType">
				<li><a href="<c:url value='/company/facet/innovation-type/${bestPracticeType.code}'/>">
					<fmt:message key="${bestPracticeType.titleCode}"/>
				</a></li>
			</c:forEach>
			</ul>
		</div>
		
	<div id="global" class="fondo_practices">
		
		<%@ include file="/WEB-INF/views/common/header.jsp" %>
		
		<div id="efqm_content" > 
			<h3 class="upload_practices">
				<fmt:message key="event.website.target"/>
			</h3>	
			<div id="conten_central">
              <div class="columna_left">
                <h4><fmt:message key="company.directory.title"/></h4>
              </div>
			  <div class="conten_gen_central">
			 
				<c:if test="${!empty tag}">
					<fmt:message key="company.directory.filter.label"/>:<b><fmt:message key="${tag}"/></b><br/>
					<a href="<c:url value='/company/list'/>" title='<fmt:message key="action.company.directory"/>' class="compa_directory">
						Disable filter
					</a>
				</c:if>
				
				<c:if test="${!empty cloud}">
				<p><fmt:message key="generic.search.msg"/>:</p>
				<div class="tagcloud" style="margin: auto; width: 20%;">	
						<ol>
							<li><a href='#' class='basic'><fmt:message key="action.filter.activity.sector"/></a></li>
							<li><a href='#' class='basic2'><fmt:message key="action.filter.innovation.type"/></a></li>
						</ol>
					</div>
				</c:if>	
			    
			    <table class="lst_practices tablesorter" summary='<fmt:message key="company.list.table.title"/>'>
                  <caption>
                    <fmt:message key="company.directory.title"/>
                  </caption>
			      <thead>
                    <tr>
                      <th scope="col" ><fmt:message key="company.directory.company.column"/></th>
                      <th scope="col"><fmt:message key="company.directory.video.column"/></th>
                      <th scope="col"><fmt:message key="company.directory.bestpractice.column"/></th>
                    </tr>
                  </thead>
                  <tbody>
                  	<c:forEach items="${companies}" var="company">
                    <tr>
                      <td scope="row" class="first">
                      	${company.companyInfo.name} <span>${company.companyInfo.city} (${company.companyInfo.country})</span> 
                      </td>
                      <td  class="second">
                      	<c:if test="${!empty company.videos}">
								<c:set var="video" value="${company.videos[0]}"/>
								<a href="<c:url value='/company/detail/${company.id}'/>" title="${company.companyInfo.name}">
									<img src="${video.thumbURL}" alt="${company.companyInfo.name}" />
                      				<span><img src="<c:url value='/static/img/interfaz/play_naranja_mini.png'/>" alt='<fmt:message key="action.video.play"/>'></span>
                      			</a>
	 						</c:if>
                      </td>
                      <td class="third">
                      	<p>${company.additionalInformation.title}</p>  
                      </td>
                   
                    </tr>
					</c:forEach>
                  </tbody>
                </table>
                
		  </div>
		</div>
		
	</div>
	<%@ include file="/WEB-INF/views/common/footer.jsp" %>
	</div>
	</body>
</html>